import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { LoginController } from './login.controller';
import { LoginService } from './login.service';
import { JwtModule } from '@nestjs/jwt';
import { JWT_CONFIG } from '../../config/jwt.config';
import { Menu } from '../menus/entities/menu.entity';
import { Role } from '../role/entities/role.entity';
import { User } from '../users/entities/user.entity';

@Module({
  imports: [TypeOrmModule.forFeature([User, Menu, Role]), JwtModule.register({ 
    secret: JWT_CONFIG.SECRET, 
    signOptions: JWT_CONFIG.SIGN_OPTIONS 
  })],
  controllers: [LoginController],
  providers: [LoginService],
  exports: [TypeOrmModule]
})

export class LoginModule {};